package cn.felord.common.security;

/**
 * jwt token storage
 *
 * @author Dax
 * @since 13 :25  2018/9/21
 */
public interface JwtTokenStorage {

    /**
     * Put string.
     *
     * @param jwtEntity the jwt entity
     * @param userId    the user id
     * @return the string
     */
    JwtEntity put(JwtEntity jwtEntity,String userId);

    /**
     * Expire.
     *
     * @param userId the user id
     */
    void expire(String userId);

    /**
     * Refresh string.
     *
     * @param jwtEntity the jwt entity
     * @param userId    the user id
     * @return the string
     */
    JwtEntity   refresh(JwtEntity jwtEntity,String userId);

    /**
     * Get.
     *
     * @param userId the user id
     * @return the string
     */
    JwtEntity get(String userId);

}
